<div class="wrapper wrapper-content animated fadeInRight">
    <!-- PAGE CONTENT BEGINS -->
    <div class="row">


        <div class="col-xs-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>搜索</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">

                        <div class="table-responsive">
                            <form class="form-search" method="get" action="<?=url('job.order/index')?>" role="form">
                                <table>
                                    <tr>
                                        <td>
                                        公司:
                                        <input id="hotelname" type="text"  name="name"   value="<{:input('get.name')}>" placeholder="请选择公司"  class="form-control"/>
                                        <input type="hidden" value="<?=$search['company_id']?>" name="company_id" id="company_id">
                                        <button style="display: none" id="but" type="button" mini="load" w="95%" h="95%" href="<?=url('miniapp/job.company/select')?>" class="btn btn-w-m btn-info">选择公司</button>

                                        <script>
                                            $("#hotelname").focus(function () {
                                                $("#but").click();
                                            });
                                            function seleGs(name,company_id){
                                                layer.closeAll();
                                                layer.msg('操作成功！');
                                                $("#hotelname").val(name);
                                                $("#company_id").val(company_id);
                                            }
                                        </script>
                                    </td>

                                        <td>
                                            <div class="input-group">
                                                <button type="submit" style="margin-top: 42%"
                                                        class="btn form-control btn-sm btn-primary">
                                                    搜索
                                                </button>
                                            </div>
                                        </td>
                                    </tr>

                                </table>

                            </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="ibox-content">
                <div class="row">
                    <div class="tableTools-container">
                    </div>
                    <div class="table-responsive">
                        <table id="simple-table" class="table table-striped">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>公司</th>
                                <th>购买时长</th>
                                <th>赠送的等级</th>
                                <th>一共需要支付</th>
                                <th>已支付余额</th>
                                <th>支付时间</th>
                                <th>支付信息</th>
                                <th>状态</th>
                                <th>下单时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <form id="mini_list">
                                <tbody>
                                <?php foreach($list as $val){ ?>
                                <tr>
                                    <td><?= $val->order_id ?></td>
                                    <td><?=empty($company[$val->company_id]) ? '已失效' :$company[$val->company_id]->company_name ?></td>
                                    <td><?=sprintf("%.0f",$val->by_time/86400)?>天</td>
                                    <td><?=$val->vip_level?>级</td>
                                    <td>￥<?=sprintf("%.2f",$val->total_price/100)?></td>
                                    <td>￥<?=sprintf("%.2f",$val->pay_money/100)?></td>
                                    <td><?=date("Y-m-d H:i:s",$val->pay_time)?></td>
                                    <td><textarea><?=$val->pay_info?></textarea></td>
                                    <td>
                                        <?php if($val->status == 0 ) {?>
                                              <span class="label label-warning">待支付</span>
                                        <?php }elseif($val->status == 8) { ?>
                                              <span class="label label-success">已支付</span>
                                        <?php } ?>
                                    </td>
                                    <td><?=date("Y-m-d H:i:s",$val->add_time)?></td>
                                    <td>
                                        <div class="hidden-sm hidden-xs btn-group">
                                            <a title="删除VIP出售记录" mini="act" href="<?=url('job.order/delete','order_id='.$val->order_id)?>" class="btn btn-xs btn-warning"><i class="fa fa-trash bigger-120"></i>删除</a>
                                        </div>
                                    </td>
                                </tr>
                                <?php } ?>
                                </tbody>
                            </form>
                        </table>
                        <div>
                            <?php echo $page; ?>
                        </div>
                    </div><!-- /.row -->
                </div><!-- /.main-container -->
            </div>
        </div>
    </div>
</div>
